package 洗牌算法;/*
 *@ 代阳敲的专属代码
 **/

import java.util.Iterator;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        Game game = new Game();
        List<Card> cards = game.createCards();
        System.out.println("原始牌：");
        System.out.println(cards);
        System.out.println("洗牌后：");
        game.shuffle(cards);
        System.out.println( cards);
        System.out.println("开始游戏：");
        List<List<Card>> hands = game.palyGame(cards);
        Iterator<List<Card>> iterator = hands.iterator();
        int i=0;
        while(iterator.hasNext()) {
            Iterator<Card> cardIterator = iterator.next().iterator();

            System.out.println("玩家："+i);
            i++;
            while(cardIterator.hasNext()) {

                System.out.print(cardIterator.next()+" ");
            }

            System.out.println();

        }
        System.out.println("剩余牌："+cards);




    }
}
